#include <scene.h>
Inheritance diagram for mudbox::Scene:
All the geometry, lights, cameras, etc, are accessed and maintained through this object. To get a pointer to the current Mudbox scene, call Kernel()->Scene()
Public Member Functions |
|
virtual const mudbox::ClassDesc * | RuntimeClass (void) const |
virtual mudbox::Camera * | ActiveCamera (void) const |
Returns a pointer to the camera that is
currently being used. |
|
virtual void | SetActiveCamera (mudbox::Camera *camera) |
Sets a different camera to be active.
|
|
virtual mudbox::Light * | ActiveLight (void) const |
Returns a pointer to the currently active
light. |
|
virtual unsigned int | CameraCount (void) const |
Returns the number of cameras in the scene.
|
|
virtual unsigned int | LightCount (void) const |
Returns the number of lights in the scene.
|
|
virtual unsigned int | GeometryCount (void) const |
Returns the number of Geometry objects in the scene.
|
|
virtual unsigned int | SelectedGeometryCount (void) const |
Returns the number of Geometry objects that are
currently selected. |
|
virtual mudbox::Camera * | AddCamera (mudbox::Camera *pCamera) |
Adds a camera to the scene. Returns a
pointer to the camera you added. |
|
virtual mudbox::Light * | AddLight (mudbox::Light *pLight) |
Adds a light to the scene. Returns a pointer
to the light you added. |
|
virtual mudbox::Geometry * | AddGeometry (mudbox::Geometry *pGeometry, mudbox::Transformation *pTransformation=0) |
Adds a geometry object to the scene. Returns
a pointer to the object you added. |
|
virtual void | RemoveGeometry (mudbox::Geometry *pGeometry) |
Removes a geometry object from the scene.
|
|
virtual mudbox::Camera * | Camera (unsigned int iIndex) const |
Returns a pointer to a Camera in the scene. |
|
virtual mudbox::Light * | Light (unsigned int iIndex) const |
Returns a pointer to a Light in the scene. |
|
virtual mudbox::Geometry * | SelectedGeometry (unsigned int iIndex) const |
Returns a pointer to a selected Geometry object in
the scene. |
|
virtual mudbox::Geometry * | Geometry (unsigned int iIndex) const |
Returns a pointer to a Geometry object in the scene.
|
|
virtual AxisAlignedBoundingBox | BoundingBox (void) const |
Returns the bounding box of the scene.
|
|
virtual void | Render (bool bSkipMaterials=false) const |
Render the scene to the current render
target using the current OpenGL pipeline settings. |
|
virtual bool | Export (const char *sFileName, bool bSelectedOnly=false) |
Export models in the scene to an OBJ file.
Returns true if successful. |
|
virtual bool | Load (QString sFileName, bool bMerge=false, bool bMaterials=true, bool bLights=true) |
Load a MUD file into this scene. Returns
true if successful. |
|
virtual bool | Save (QString sFileName) |
Save this scene. Returns true if
successful. |
|
mudbox::Geometry * | ActiveGeometry () const |
Returns a pointer to the active object (that
is, the object whose layers are displayed in the UI). |
|
void | SetActiveGeometry (mudbox::Geometry *geometry) const |
Sets the specified geometry to be active.
This means that its layers will be displayed in the UI. This is
unrelated to selection. |
|
virtual void | SetActivePaintLayer (mudbox::Layer *layer) |
Sets the specified paint layer to be active.
|
|
virtual void | SetActiveTexture (mudbox::TexturePool *layer) |
Sets the layer associated with the active
texture pool to be active. |
|
virtual mudbox::Layer * | ActivePaintLayer () const |
Returns a pointer to the currently active
paint layer. |
|
virtual mudbox::TexturePool * | ActiveTexture () const |
Returns a pointer to the currently active
texture map. |
|
virtual void | MakeThumbnail (QImage &image, int iSize=128) |
Static Public Member Functions |
|
const mudbox::ClassDesc * | StaticClass (void) |
mudbox::Node * | CreateInstances (unsigned int iCount=1) |
Public Attributes |
|
aevent | m_eSceneRender |
Protected Member Functions |
|
Scene (void) | |
Do not use the constructor directly.
|
|
Do not use the constructor directly. It is unlikely that you would ever create your own scene in a plug-in. If you do need to, you should not call the constructor directly. Instead, use CreateInstances, like this: Scene *myNewScene = CreateInstance<Scene>(); |
|
Reimplemented from mudbox::TreeNode. 00028 : |
|
Reimplemented from mudbox::TreeNode. |
|
Reimplemented from mudbox::TreeNode. |
|
Returns a pointer to the camera that is currently being used. |
|
Sets a different camera to be active. |
|
Returns a pointer to the currently active light. |
|
Returns the number of cameras in the scene. |
|
Returns the number of lights in the scene. |
|
Returns the number of Geometry objects in the scene. |
|
Returns the number of Geometry objects that are currently selected. |
|
Adds a camera to the scene. Returns a pointer to the camera you added. Once you add a camera to the scene, the scene is responsible for deleting it.
|
|
Adds a light to the scene. Returns a pointer to the light you added. Once you add a light to the scene, the scene is responsible for deleting it.
|
|
Adds a geometry object to the scene. Returns a pointer to the object you added. Once you add a geometry object to the scene, the scene is responsible for deleting it.
|
|
Removes a geometry object from the scene. Note that the removed geometry is not deleted. Once the geometry is removed, it becomes the caller's responsibility to delete it.
|
|
Returns a pointer to a Camera in the scene. (If the index is out of range, NULL is returned. To find out how many cameras are in the scene, call CameraCount().)
|
|
Returns a pointer to a Light in the scene. (If the index is out of range, NULL is returned. To find out how many lights are in the scene, call LightCount().)
|
|
Returns a pointer to a selected Geometry object in the scene. (If the index is out of range, NULL is returned. To find out how many geometry objects are selected in the scene, call SelectedGeometryCount().)
|
|
Returns a pointer to a Geometry object in the scene. (If the index is out of range, NULL is returned. To find out how many geometry objects are in the scene, call GeometryCount().)
|
|
Returns the bounding box of the scene. This bounding box is axis-aligned, and in World Space. |
|
Render the scene to the current render target using the current OpenGL pipeline settings. Note: This method is not part of the regular refresh cycle. To force the screen to refresh after making changes, call Kernel->Refresh() Use this method when you need to render the scene for purposes internal to your plug-in. For example, you can create a custom texture, make it the render target (see the Texture class defined in material.h), set up whatever special shaders you need, then call this method to render the scene into your texture. By default, objects will be rendered with their own materials.
If you want to render everything with a shader that you set up, set
|
|
Export models in the scene to an OBJ file. Returns true if successful.
|
|
Load a MUD file into this scene. Returns true if successful.
|
|
Save this scene. Returns true if successful.
|
|
Returns a pointer to the active object (that is, the object whose layers are displayed in the UI). Note that the 'active' object is unrelated to 'selected' objects. 'Active' refers to the object that is currently the focus of the user interface. For example, only one object at a time displays its layer information --- this is the active object. |
|
Sets the specified geometry to be active. This means that its layers will be displayed in the UI. This is unrelated to selection.
|
|
Sets the specified paint layer to be active.
|
|
Sets the layer associated with the active texture pool to be active.
|
|
Returns a pointer to the currently active paint layer. |
|
Returns a pointer to the currently active texture map. |
|
|